package com.iMusic.businessLogicLayer.orderStatus;

public class OrderStatus {

	public static final OrderStatus InCart = new OrderStatus (0);
	public static final OrderStatus Cancelled = new OrderStatus (1);
	public static final OrderStatus InProgress = new OrderStatus (2);
	public static final OrderStatus Shipped = new OrderStatus (3);
	public static final OrderStatus Delivered = new OrderStatus (4);
	
	private static final OrderStatus[] _values = {InCart, Cancelled, InProgress, Shipped, Delivered};
	private static final String[] _names = {"In cart", "Cancelled", "In Progress", "Shipped", "Delivered"};
	
	int code = -1;
	
	OrderStatus (int code) {
		this.code = code;
	}
	
	public int getCode() {
		return code;
	}
	
	public String getName() {
		return _names[code];
	}
	
	static public OrderStatus getObject(int code) {
		return _values[code];
	}
	
	
}
